import javax.swing.*;
import java.awt.event.*;
class Test {
  public static void main( String ... args ) {
 
     final JLabel label = new JLabel();
 
     // actualizar el label
     ActionListener listener = new ActionListener(){
        public void actionPerformed( ActionEvent e ) {
           label.setText( new java.util.Date().toString() );
        }
      };
      JButton button = new JButton();
      button.addActionListener( listener );
       // presentarlos
      JPanel panel = new JPanel();
      panel.add( label );
      panel.add( button);
      // mostrar el frame
      JFrame frame = new JFrame();
      frame.add( panel );
      frame.setVisible( true );
   }
}